<template>
    <view class="author">
        <view class="author-info">
            <u-image
                :src="author.avatar"
                shape="circle"
                width="50rpx"
                height="50rpx"
            ></u-image>
            <u-text
                :text="'创作者 ' + author.name"
                size="24rpx"
                :color="color"
                lineHeight="33rpx"
                block
                margin="0 0 0 14rpx"
            ></u-text>
        </view>
        <view v-if="showBtn" class="series-btn">
            藏品列表
        </view>
    </view>
</template>

<script>
    export default {
        name: "index",
        props: {
            showBtn: {
                type: Boolean,
                default: true
            },
            color: {
                type:String,
                default: "#666666"
            },
            author: {
                type: Object,
                default: () => {}
            }
        }
    }
</script>

<style lang="scss" scoped>
    .author {
        display: flex;
        align-items: center;
        justify-content: space-between;
        .author-info {
            display: flex;
            align-items: center;
        }
        .series-btn {
            width: 140rpx;
            height: 44rpx;
            background: linear-gradient(270deg, #686868 0%, #0D0D0D 100%);
            border-radius: 22rpx;
            font-size: 24rpx;
            font-weight: 400;
            color: #FFFFFF;
            text-align: center;
            line-height: 44rpx;
        }
    }
</style>
